package physics;

import globals.GlobalObjects;
import graphics.Light;

public class Sun extends Planet{
	
	String lightObjectName = "";
	Light light;
	
	public Light getLight(){
		return light;
	}

	@Override
	public void setParameter(String name, String[] args) {
		if (name.equals("light")){
			lightObjectName = args[0];
			return;
		}
		super.setParameter(name, args);
	}

	@Override
	public void commit() {
		light = (Light) GlobalObjects.getGraphic(lightObjectName);
		super.commit();
	}
	
	
}
